<?php
$resultAttributes = $test->get('result_attributes');
?>
<div>
  <h2 class='test-title'>
    <span class='test-<?php echo $test['result'] ?>'>&nbsp;&nbsp;&nbsp;&nbsp;</span>
    <?php echo $test->getReadableTestName() ?> ( <?php echo $test->getReadableClassName() ?> )
  </h2>
  <table class='test-table'>
    <tr>
      <th>result</th>
      <td><?php echo $test['result'] ?></td>  
    </tr>
    <?php if($test['error_type']): ?>
    <tr>
      <th class='test-text-ERROR'>error type</th>
      <td class='test-text-ERROR'><?php echo $test['error_type'] ?></td>  
    </tr>
    <tr>
      <th class='test-text-ERROR'>error message</th>
      <td class='test-text-ERROR'><a href='javascript:void(0)' onclick='tests.tests.displayError(<?php echo $test['id'] ?>);'>see</a></td>
    </tr>
    <?php endif; ?>
    <tr>
      <th>id:</th>
      <td><?php echo $test['id'] ?></td>
    </tr>
    <tr>
      <th>import date</th>
      <td><?php echo GraduaDate::formatHidm($test['test_last_import_time']) ?></td>  
    </tr>
    <tr>
      <th>result date</th>
      <td><?php echo GraduaDate::formatHidm($test['result_last_import_time']) ?></td>  
    </tr>
    <tr>
      <th>assertions</th>
      <td><?php echo GraduaDate::formatHidm($test['result_last_import_time']) ?></td>
    </tr>
  </table>
  
  <h4 class='related-tasks'>Related Tasks:</h4>
  <div route='RelatedTasksR'>
  <?php foreach($test->DevTask as $task): ?>
    <div class='task-path'>
    <?php foreach($task->getPath() as $item): ?>
    <a onclick='mainMenu.showTasks(<?php echo $item[2] ?>);' >
      >> <?php echo $item[0] ?>
    </a>
    <?php endforeach; ?>
    </div>
  <?php endforeach; ?>
  </div>
  <h4 class='related-tasks'>File:</h4>
  <table class='test-table'>
    <tr>
      <th>dir:</th>
      <td><?php echo $test['dir'] ?></td>
    </tr>
    <tr>
      <th>file:</th>
      <td><?php echo $test['file'] ?></td>
    </tr>
    <tr>
      <th>result file:</th>
      <td><?php echo $resultAttributes['file'] ?></td>
    </tr>
  </table>
  <h4 class='related-tasks'>Related Tasks:</h4>
</div>
<div id='test-error' style='display:none;'>
  <?php echo nl2br($test['error_message']) ?> 
</div>